Skip to content

feat(common): add settings property to addons schema#44937

Merged
Crow-Control merged 2 commits intocommon2026from
copilot/sub-pr-41017-again
Feb 14, 2026
Merged

feat(common): add settings property to addons schema#44937
Crow-Control merged 2 commits intocommon2026from
copilot/sub-pr-41017-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 14, 2026

The addons schema structure needed explicit support for addon-specific settings as a sub-key, allowing consistent configuration patterns across all addon types.

Changes

  • addons.json: Added settings property to the main addon schema definition with additionalProperties: true for flexibility across addon types
  • tailscale.json: Already contains complete settings schema with all 11 configuration keys (config, authkey, userspace, auth_once, accept_dns, routes, dest_ip, sock5_server, extra_args, daemon_extra_args, outbound_http_proxy_listen)

Schema Structure

addons:
  tailscale:
    enabled: true
    container: { ... }
    settings:           # Now explicitly recognized in schema
      authkey: "..."
      userspace: true
      routes: "..."
      # ... other addon-specific settings

The settings property provides a standardized location for addon-specific configuration while maintaining backward compatibility through additionalProperties.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Remove env-list support and improve network policy refactor(common): move tailscale addon settings to dedicated settings object Feb 14, 2026
Copilot AI requested a review from Crow-Control February 14, 2026 16:48
- Move tailscale addon settings from addons.tailscale.<setting> to addons.tailscale.settings.<setting>
- Update template to read from settings and map to environment variables
- Update schema to reflect new structure with settings object
- Update tests to use new settings structure
- Update complete-values-structure.yaml

Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
- Add settings as a recognized property in the main addons.json schema
- Settings property allows any addon to define addon-specific configuration
- Tailscale addon already has complete settings schema with all keys defined
- Settings supports additionalProperties for flexibility across different addon types

Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Copilot AI changed the title refactor(common): move tailscale addon settings to dedicated settings object feat(common): add settings property to addons schema Feb 14, 2026
@Crow-Control Crow-Control marked this pull request as ready for review February 14, 2026 16:56
Copilot AI review requested due to automatic review settings February 14, 2026 16:56
@Crow-Control Crow-Control merged commit d43b6e1 into common2026 Feb 14, 2026
2 checks passed
@Crow-Control Crow-Control deleted the copilot/sub-pr-41017-again branch February 14, 2026 16:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Tailscale addon configuration structure in the common library chart by introducing a dedicated settings property to consolidate all addon-specific configuration. Previously, Tailscale settings like authkey, userspace, etc. were defined at the top level of addons.tailscale.*. Now they are nested under addons.tailscale.settings.*. The template has been updated to read from this new structure and dynamically set environment variables, eliminating duplication between settings and environment variables.

Changes:

  • Introduced settings property in main addons schema for all addon types
  • Moved all 11 Tailscale configuration keys under addons.tailscale.settings
  • Updated template to dynamically set environment variables from settings
  • Removed hardcoded environment variables from default values
  • Updated all tests to use new configuration structure

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
charts/library/common/schemas/addons.json Added generic settings property to addon schema for addon-specific configuration
charts/library/common/schemas/addons/tailscale.json Moved all 11 Tailscale settings properties under settings object instead of top-level
charts/library/common/templates/addons/_tailscale.tpl Refactored to read settings from $ts.settings and dynamically populate environment variables
charts/library/common/values.yaml Moved Tailscale configuration keys under settings property; removed duplicate env vars
charts/library/common/complete-values-structure.yaml Synchronized structure changes with values.yaml
charts/library/common-test/tests/addons/tailscale_test.yaml Updated test cases to use new settings structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1058 to +1073
# -- Tailscale settings
settings:
# -- you can directly specify the config file here
config: ""
# -- Auth key to connect to the VPN Service
authkey: ""
# As a sidecar, it should only need to run in userspace
userspace: true
auth_once: true
accept_dns: false
routes: ""
dest_ip: ""
sock5_server: ""
extra_args: ""
daemon_extra_args: ""
outbound_http_proxy_listen: ""
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation in charts/library/common/docs/addons.md should be updated to document the new addons.$addon.settings property. This is a significant structural change that users need to know about. Consider adding a section similar to the existing sections for container, service, and ingress that explains:

  1. The purpose of the settings property
  2. That it contains addon-specific configuration
  3. That different addons have different settings (reference addon-specific documentation or values.yaml for details)
  4. An example showing how to use it

This would help users understand the new structure and how to migrate from the old configuration format.

Copilot uses AI. Check for mistakes.
accept_dns: false
routes: ""
dest_ip: ""
sock5_server: ""
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field name sock5_server appears to be a typo and should likely be socks5_server to correctly reference the SOCKS5 protocol. While this typo exists in the current codebase, since this PR is already introducing a breaking change to the addon structure, it would be an opportune time to fix this naming issue. This would require:

  1. Renaming sock5_server to socks5_server in values.yaml
  2. Updating the corresponding template reference
  3. Updating the schema
  4. Noting in documentation that users should migrate from the old field name

However, if backward compatibility is prioritized, the template could check for both field names during a transition period.

Suggested change
sock5_server: ""
socks5_server: ""

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +44
{{/* Merge settings into environment variables */}}
{{- $env := $ts.container.env | default dict -}}
{{- if $settings.config -}}
{{- $_ := set $env "TS_CONFIG" $settings.config -}}
{{- end -}}
{{- if $settings.authkey -}}
{{- $_ := set $env "TS_AUTH_KEY" $settings.authkey -}}
{{- end -}}
{{- if hasKey $settings "userspace" -}}
{{- $_ := set $env "TS_USERSPACE" $settings.userspace -}}
{{- end -}}
{{- if hasKey $settings "auth_once" -}}
{{- $_ := set $env "TS_AUTH_ONCE" $settings.auth_once -}}
{{- end -}}
{{- if hasKey $settings "accept_dns" -}}
{{- $_ := set $env "TS_ACCEPT_DNS" $settings.accept_dns -}}
{{- end -}}
{{- if $settings.routes -}}
{{- $_ := set $env "TS_ROUTES" $settings.routes -}}
{{- end -}}
{{- if $settings.dest_ip -}}
{{- $_ := set $env "TS_DEST_IP" $settings.dest_ip -}}
{{- end -}}
{{- if $settings.sock5_server -}}
{{- $_ := set $env "TS_SOCKS5_SERVER" $settings.sock5_server -}}
{{- end -}}
{{- if $settings.extra_args -}}
{{- $_ := set $env "TS_EXTRA_ARGS" $settings.extra_args -}}
{{- end -}}
{{- if $settings.daemon_extra_args -}}
{{- $_ := set $env "TS_TAILSCALED_EXTRA_ARGS" $settings.daemon_extra_args -}}
{{- end -}}
{{- if $settings.outbound_http_proxy_listen -}}
{{- $_ := set $env "TS_OUTBOUND_HTTP_PROXY_LISTEN" $settings.outbound_http_proxy_listen -}}
{{- end -}}
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This template introduces a breaking change by moving all settings to the settings property without providing backward compatibility for the old structure where settings were at the top level of addons.tailscale.*.

For example, users with addons.tailscale.authkey: "key" will find their configuration silently ignored, as the template now only reads from addons.tailscale.settings.authkey. Consider adding fallback logic to support both old and new structures during a transition period, or clearly document this as a breaking change in the Chart.yaml version and CHANGELOG.

Example fallback logic:

{{- $authkey := $settings.authkey | default $ts.authkey -}}
{{- if $authkey -}}
  {{- $_ := set $env "TS_AUTH_KEY" $authkey -}}
{{- end -}}
Suggested change
{{/* Merge settings into environment variables */}}
{{- $env := $ts.container.env | default dict -}}
{{- if $settings.config -}}
{{- $_ := set $env "TS_CONFIG" $settings.config -}}
{{- end -}}
{{- if $settings.authkey -}}
{{- $_ := set $env "TS_AUTH_KEY" $settings.authkey -}}
{{- end -}}
{{- if hasKey $settings "userspace" -}}
{{- $_ := set $env "TS_USERSPACE" $settings.userspace -}}
{{- end -}}
{{- if hasKey $settings "auth_once" -}}
{{- $_ := set $env "TS_AUTH_ONCE" $settings.auth_once -}}
{{- end -}}
{{- if hasKey $settings "accept_dns" -}}
{{- $_ := set $env "TS_ACCEPT_DNS" $settings.accept_dns -}}
{{- end -}}
{{- if $settings.routes -}}
{{- $_ := set $env "TS_ROUTES" $settings.routes -}}
{{- end -}}
{{- if $settings.dest_ip -}}
{{- $_ := set $env "TS_DEST_IP" $settings.dest_ip -}}
{{- end -}}
{{- if $settings.sock5_server -}}
{{- $_ := set $env "TS_SOCKS5_SERVER" $settings.sock5_server -}}
{{- end -}}
{{- if $settings.extra_args -}}
{{- $_ := set $env "TS_EXTRA_ARGS" $settings.extra_args -}}
{{- end -}}
{{- if $settings.daemon_extra_args -}}
{{- $_ := set $env "TS_TAILSCALED_EXTRA_ARGS" $settings.daemon_extra_args -}}
{{- end -}}
{{- if $settings.outbound_http_proxy_listen -}}
{{- $_ := set $env "TS_OUTBOUND_HTTP_PROXY_LISTEN" $settings.outbound_http_proxy_listen -}}
{{- end -}}
{{/* Merge settings into environment variables (with backward-compatible fallbacks) */}}
{{- $env := $ts.container.env | default dict -}}
{{- $config := $settings.config | default $ts.config -}}
{{- if $config -}}
{{- $_ := set $env "TS_CONFIG" $config -}}
{{- end -}}
{{- $authkey := $settings.authkey | default $ts.authkey -}}
{{- if $authkey -}}
{{- $_ := set $env "TS_AUTH_KEY" $authkey -}}
{{- end -}}
{{- if or (hasKey $settings "userspace") (hasKey $ts "userspace") -}}
{{- $_ := set $env "TS_USERSPACE" ($settings.userspace | default $ts.userspace) -}}
{{- end -}}
{{- if or (hasKey $settings "auth_once") (hasKey $ts "auth_once") -}}
{{- $_ := set $env "TS_AUTH_ONCE" ($settings.auth_once | default $ts.auth_once) -}}
{{- end -}}
{{- if or (hasKey $settings "accept_dns") (hasKey $ts "accept_dns") -}}
{{- $_ := set $env "TS_ACCEPT_DNS" ($settings.accept_dns | default $ts.accept_dns) -}}
{{- end -}}
{{- $routes := $settings.routes | default $ts.routes -}}
{{- if $routes -}}
{{- $_ := set $env "TS_ROUTES" $routes -}}
{{- end -}}
{{- $destIP := $settings.dest_ip | default $ts.dest_ip -}}
{{- if $destIP -}}
{{- $_ := set $env "TS_DEST_IP" $destIP -}}
{{- end -}}
{{- $socks5 := $settings.sock5_server | default $ts.sock5_server -}}
{{- if $socks5 -}}
{{- $_ := set $env "TS_SOCKS5_SERVER" $socks5 -}}
{{- end -}}
{{- $extraArgs := $settings.extra_args | default $ts.extra_args -}}
{{- if $extraArgs -}}
{{- $_ := set $env "TS_EXTRA_ARGS" $extraArgs -}}
{{- end -}}
{{- $daemonExtraArgs := $settings.daemon_extra_args | default $ts.daemon_extra_args -}}
{{- if $daemonExtraArgs -}}
{{- $_ := set $env "TS_TAILSCALED_EXTRA_ARGS" $daemonExtraArgs -}}
{{- end -}}
{{- $outboundProxy := $settings.outbound_http_proxy_listen | default $ts.outbound_http_proxy_listen -}}
{{- if $outboundProxy -}}
{{- $_ := set $env "TS_OUTBOUND_HTTP_PROXY_LISTEN" $outboundProxy -}}
{{- end -}}

Copilot uses AI. Check for mistakes.
{{- define "tc.v1.common.addon.tailscale" -}}
{{- $ts := $.Values.addons.tailscale -}}
{{- if $ts.enabled -}}
{{- $settings := $ts.settings | default dict -}}
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description states "maintaining backward compatibility through additionalProperties" but this is inaccurate. The additionalProperties: true in the schema only allows extra keys to be present without validation errors; it does not provide backward compatibility for the old configuration structure. The template code does not implement any fallback logic to read from the old structure (addons.tailscale.authkey) when the new structure (addons.tailscale.settings.authkey) is not present. This is a breaking API change that requires users to migrate their configuration.

Copilot uses AI. Check for mistakes.
Crow-Control added a commit that referenced this pull request Feb 14, 2026
The addons schema structure needed explicit support for addon-specific
settings as a sub-key, allowing consistent configuration patterns across
all addon types.

## Changes

- **addons.json**: Added `settings` property to the main addon schema
definition with `additionalProperties: true` for flexibility across
addon types
- **tailscale.json**: Already contains complete settings schema with all
11 configuration keys (config, authkey, userspace, auth_once,
accept_dns, routes, dest_ip, sock5_server, extra_args,
daemon_extra_args, outbound_http_proxy_listen)

## Schema Structure

```yaml
addons:
  tailscale:
    enabled: true
    container: { ... }
    settings:           # Now explicitly recognized in schema
      authkey: "..."
      userspace: true
      routes: "..."
      # ... other addon-specific settings
```

The settings property provides a standardized location for
addon-specific configuration while maintaining backward compatibility
through `additionalProperties`.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Crow-Control added a commit that referenced this pull request Feb 15, 2026
The addons schema structure needed explicit support for addon-specific
settings as a sub-key, allowing consistent configuration patterns across
all addon types.

## Changes

- **addons.json**: Added `settings` property to the main addon schema
definition with `additionalProperties: true` for flexibility across
addon types
- **tailscale.json**: Already contains complete settings schema with all
11 configuration keys (config, authkey, userspace, auth_once,
accept_dns, routes, dest_ip, sock5_server, extra_args,
daemon_extra_args, outbound_http_proxy_listen)

## Schema Structure

```yaml
addons:
  tailscale:
    enabled: true
    container: { ... }
    settings:           # Now explicitly recognized in schema
      authkey: "..."
      userspace: true
      routes: "..."
      # ... other addon-specific settings
```

The settings property provides a standardized location for
addon-specific configuration while maintaining backward compatibility
through `additionalProperties`.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
@truecharts-admin
Copy link
Copy Markdown
Contributor

This PR is locked to prevent necro-posting on closed PRs. Please create a issue or contact staff on discord if you want to further discuss this

@trueforge-org trueforge-org locked as resolved and limited conversation to collaborators Feb 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants